<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
        <script src="./lib/vue.js"></script>
    </head>
    <body>
        <div id="app">
            <div v-if="score >= 90">优秀</div>
            <div v-else-if="score >= 80">良好</div>
            <div v-else-if="score >= 60">一般</div>
            <div v-else>差</div>
            <div v-show="flag">测试v-show</div>
            <button @click="handle">按钮</button>
        </div>
        <script>
            var app = new Vue({
                el: '#app',
                data: {
                    score: 10,
                    flag: false
                },
                methods: {
                    handle: function() {
                        this.flag = !this.flag;
                        if (score != 10) {
                            alert('123');
                        }
                    }
                }
            });
        </script>
    </body>
</html>
